/*
 * Created on May 10, 2004
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package ro.gateway.aida.utils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/**
 * @author mihai e-mail: mihai@ro-gateway.org
 */
public class LPDDateConverter {
	public static final SimpleDateFormat df = new SimpleDateFormat(
			"dd:MMM:yyyy:HH:mm:Z");
	public static final SimpleDateFormat publisher_df = new SimpleDateFormat(
	"yyyy-mm-dd");
	static public String printCalendar(Calendar c) {
		return df.format(c.getTime());
	}
	public static Calendar parseCalendar(String c,SimpleDateFormat sdf) throws ParseException {
		Date d = sdf.parse(c);
		Calendar cal = Calendar.getInstance();
		
		cal.setTime(d);
		return cal;
	}
	
}
